package com.zwy.rxjava;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class MainActivity extends Activity implements OnClickListener {
	private Button btn;
	private TextView tv;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);


		LogUtils.allowD=true;
		LogUtils.customTagPrefix = "itchen";


		tv = (TextView) findViewById(R.id.tv_main);
		findViewById(R.id.btn1_main).setOnClickListener(this);
		findViewById(R.id.btn2_main).setOnClickListener(this);
		findViewById(R.id.btn3_main).setOnClickListener(this);
		findViewById(R.id.btn4_main).setOnClickListener(this);
		findViewById(R.id.btn5_main).setOnClickListener(this);
		
		findViewById(R.id.btn6_main).setOnClickListener(this);

	}

	@Override
	public void onClick(View v) {
		Intent intent = new Intent();
		switch (v.getId()) {
		case R.id.btn1_main:
			intent.setClass(this, RxJavaDemo1.class);
			startActivity(intent);
			break;
		case R.id.btn2_main:
			intent.setClass(this, RxJavaDemo2.class);
			startActivity(intent);
			break;
		case R.id.btn3_main:
			intent.setClass(this, RxJavaDemo3.class);
			startActivity(intent);
			break;
		case R.id.btn4_main:
			intent.setClass(this, RxJavaDemo4.class);
			startActivity(intent);
			break;
		case R.id.btn5_main:
			intent.setClass(this, RxJavaDemo5.class);
			startActivity(intent);
			break;
		case R.id.btn6_main:
			intent.setClass(this, RXJavaDemo6.class);
			startActivity(intent);
			break;

		default:
			break;
		}
	}

}
